﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;
using Pottery.Frontend.Helpers;
using Softserve.Pottery.Infrastructure;

namespace Pottery.Frontend.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        public ActionResult ChangeLanguage(string language, string actionName, string controllerName)
        {
            CookieHelper.SetCookieValue(Constants.COOKIE_LANGUAGE_NAME, language, null);

            return RedirectToAction(actionName, controllerName);
        }
    }
}
